function validateValue()
{
    validator = new CustomValidator(); 
    validator.AddValidator("email_addr","email","Please give a proper email address");
    validator.AddValidator("position","required","Position Sought cannot be obmitted");
    validator.AddValidator("salary","required","Expected salary cannot be obmitted");
    validator.AddValidator("salary","number","Salary must be a number");
    if(!validator.DoValidate())
    {
        return validator.error_hash;
    }
    else
    {
        return false;
    }
}

function validateSubMenu()
{
    validator = new CustomValidator(); 
    validator.AddValidator("menu_order","posint","Order must be a positive integer");
    validator.AddValidator("menu_title","required","Title cannot be empty.");   
    if (!validator.DoValidate())
    {
        return validator.error_hash;
    }
    else
    {
        return false;
    }
}

function validateNews()
{
    validator = new CustomValidator(); 
    validator.AddValidator("news_order","posint","Order must be a positive integer");
    validator.AddValidator("news_title","required","Title cannot be empty.");   
    if (!validator.DoValidate())
    {
        return validator.error_hash;
    }
    else
    {
        return false;
    }
}